package com.maiji.cloud.utils;

public enum MessageTypeEnum {
	
	/**
	 * 弹框操作类型
	 */
	
	IS_SKIP(1,"进入下一阶段"),
	IS_EXTENSION(2,"继续执行此阶段"),
	IS_RESTART(3,"重新开始麦吉阶段"),
	
	
	/**
	 * 弹框内容
	 */
	MESSAGE_TYPE_ONE(4,"恭喜走完一阶段最佳期"),
	MESSAGE_TYPE_TWO(5,"您已到一阶段极限"),
	MESSAGE_TYPE_THREE(6,"好久没见  欢迎回来"),
	MESSAGE_TYPE_FOUR(7,"欢迎进入减重黄金期，加油"),
	MESSAGE_TYPE_FIVE(8,"恭喜完成二阶段最佳期"),
	MESSAGE_TYPE_SIX(9,"三阶段已完成"),
	MESSAGE_TYPE_SEVEN(10,"此阶段为终生维持期，加油！");
	
	
	private Integer key;

    private String value;

    MessageTypeEnum(Integer key, String value) {
        this.key = key;
        this.value = value;
    }

    public String getValue() {
        return value;
    }

    public Integer getKey() {
        return key;
    }

    public static String getMsg(Integer key) {
        String msg = "";
        if (key == null) {
            return msg;
        }
        for (MessageTypeEnum err : MessageTypeEnum.values()) {
            if (key.equals(err.key)) {
                return err.value;
            }
        }
        return msg;
    }

    
}
